﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;


namespace XFramework
{

    /// <summary>
    /// 缓存池调用示例
    /// </summary>
    public class UsePool : MonoBehaviour
    {
        void Start()
        {
            //创建物体
            GameObject obj = PoolManager.GetInstance()
                .Pop("BulletPool", "bullet", transform.parent, transform.position);

            //回收物体
            PoolManager.GetInstance().Push("BulletPool", obj);

            //清空物体,
            PoolManager.GetInstance().Clear();
        }

    }
}
